package com.ruoyi.basedata.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.basedata.mapper.BdPurpriceMapper;
import com.ruoyi.basedata.domain.BdPurprice;
import com.ruoyi.basedata.service.IBdPurpriceService;

/**
 * 采购价Service业务层处理
 * 
 * @author ptt
 * @date 2023-03-24
 */
@Service
public class BdPurpriceServiceImpl implements IBdPurpriceService 
{
    @Autowired
    private BdPurpriceMapper bdPurpriceMapper;

    /**
     * 查询采购价
     * 
     * @param id 采购价主键
     * @return 采购价
     */
    @Override
    public BdPurprice selectBdPurpriceById(Long id)
    {
        return bdPurpriceMapper.selectBdPurpriceById(id);
    }

    /**
     * 查询采购价列表
     * 
     * @param bdPurprice 采购价
     * @return 采购价
     */
    @Override
    public List<BdPurprice> selectBdPurpriceList(BdPurprice bdPurprice)
    {
        return bdPurpriceMapper.selectBdPurpriceList(bdPurprice);
    }

    /**
     * 新增采购价
     * 
     * @param bdPurprice 采购价
     * @return 结果
     */
    @Override
    public int insertBdPurprice(BdPurprice bdPurprice)
    {
        return bdPurpriceMapper.insertBdPurprice(bdPurprice);
    }

    /**
     * 修改采购价
     * 
     * @param bdPurprice 采购价
     * @return 结果
     */
    @Override
    public int updateBdPurprice(BdPurprice bdPurprice)
    {
        return bdPurpriceMapper.updateBdPurprice(bdPurprice);
    }

    /**
     * 批量删除采购价
     * 
     * @param ids 需要删除的采购价主键
     * @return 结果
     */
    @Override
    public int deleteBdPurpriceByIds(Long[] ids)
    {
        return bdPurpriceMapper.deleteBdPurpriceByIds(ids);
    }

    /**
     * 删除采购价信息
     * 
     * @param id 采购价主键
     * @return 结果
     */
    @Override
    public int deleteBdPurpriceById(Long id)
    {
        return bdPurpriceMapper.deleteBdPurpriceById(id);
    }


    @Override
    public void banAllPurprice() {
        bdPurpriceMapper.banAllPurprice();
    }

    @Override
    public int del60DaysData(String date) {
        return bdPurpriceMapper.del60DaysData(date);
    }
}
